/* 这里写获得监控数据的接口 */
var express = require("express")
var router = express.Router()

/* 导入增删改查的方法 */
const { exec, getAll, getOne } = require("../../db")

router.get('/back/monitor',async (req,res)=>{
    let sql=`select * from monitorinfo`
    try {
        let data = await getAll(sql)
        res.send({
          code: 200,
          message: "success",
          result: data,
        })
      } catch (err) {
        res.send({
          code: 201,
          message: "fail",
          result: "",
        })
      }
})
module.exports = router
